Class TcpConnectionImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.TcpConnectionImpl
All Implemented Interfaces:
IPCObject, TcpConnection

public class TcpConnectionImpl extends IPCObjectImpl implements TcpConnection
Information provided by the PKI file:

    \class TcpConnection
    
    \brief TcpConnection for TCP connections made from TcpProcess's listen() and connect().
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getLocalIp

      public IPAddress getLocalIp()
      Information provided by the PKI file:
      
          \brief Get local Ip Address
          \return ip, local ip address
          
              
      Specified by:
      getLocalIp in interface TcpConnection
      Returns:
      IPAddress Returns a IPAddress
    • getLocalIpv6

      public IPV6Address getLocalIpv6()
      Information provided by the PKI file:
      
          \brief Get local Ipv6 Address
          \return ipv6, local ipv6 address
          
              
      Specified by:
      getLocalIpv6 in interface TcpConnection
      Returns:
      IPV6Address Returns a IPV6Address
    • getLocalPort

      public int getLocalPort()
      Information provided by the PKI file:
      
          \brief Get local Port number
          \return int, port number
          
              
      Specified by:
      getLocalPort in interface TcpConnection
      Returns:
      int Returns a int
    • getRemoteIp

      public IPAddress getRemoteIp()
      Information provided by the PKI file:
      
          \brief Get remote Ip Address
          \return ip, remote ip address
          
              
      Specified by:
      getRemoteIp in interface TcpConnection
      Returns:
      IPAddress Returns a IPAddress
    • getRemoteIpv6

      public IPV6Address getRemoteIpv6()
      Information provided by the PKI file:
      
          \brief Get remote Ipv6 Address
          \return ipv6, remote ipv6 address
          
              
      Specified by:
      getRemoteIpv6 in interface TcpConnection
      Returns:
      IPV6Address Returns a IPV6Address
    • getRemotePort

      public int getRemotePort()
      Information provided by the PKI file:
      
          \brief Get remote port number
          \return int, remote port number
          
              
      Specified by:
      getRemotePort in interface TcpConnection
      Returns:
      int Returns a int
    • getRemoteIpString

      public String getRemoteIpString()
      Information provided by the PKI file:
      
          \brief Get remote ip address in string format
          \return string, remote ip address
          
              
      Specified by:
      getRemoteIpString in interface TcpConnection
      Returns:
      String Returns a String
    • getState

      public TcpConnectionState getState()
      Information provided by the PKI file:
      
          \brief get the tcp connection state
          \return TcpConnectionState
          CLOSED = 0,
          SYN_SENT = 1,
          SYN_RECEIVED = 2,
          ESTABLISHED = 3,
          LISTEN = 4,
          FIN_WAIT_1 = 5,
          TIMED_WAIT = 6,
          CLOSE_WAIT = 7,
          FIN_WAIT_2 = 8,
          LAST_ACK = 9,
          CLOSING = 10
          
              
      Specified by:
      getState in interface TcpConnection
      Returns:
      TcpConnectionState Returns a TcpConnectionState
    • accept

      public void accept(boolean bAccepted)
      Information provided by the PKI file:
      
          \brief Accept the connection request
          \param bAccepted, bool- true to accept and false to reject
          
              
      Specified by:
      accept in interface TcpConnection
      Parameters:
      bAccepted - Takes in a parameter of bAccepted